home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2067 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  680 b 

  1. Path: sfov1.verifone.com!nntp
  2. Newsgroups: comp.lang.c++
  3. Subject: On Exception handling.....from a newbie
  4. Message-ID: <1996Jan15.013336.4730@sfov1.verifone.com>
  5. From: khemani_p1@hnlv4.verifone.com
  6. Date: Sun, 14 Jan 96 13:34:41 GMT  
  7. Organization: VeriFone Inc.
  8. Keywords: exception,try,catch
  9. Nntp-Posting-Host: hnlv4.verifone.com
  10.  
  11.  
  12.  
  13.  
  14. I want to know how do I retry a try block which has thrown a exception. Is 
  15. there some neat of doing this in C++ ?
  16.  
  17.  
  18.  
  19. For eg.
  20.  
  21. try {
  22.      open file;
  23.     read the blocks;
  24.     ...
  25.     } catch (OpenFileException e)
  26.     {
  27.     retry (how?)
  28.     }
  29.       catch (ReadFileException e)
  30.     {
  31.     close file;
  32.     retry (?)
  33.     }
  34.  
  35.  
  36.  
  37. Please send the reply to khemani_p1@verifone.com
  38.  
  39. Khemani
  40.